UNPKG

pulse-dashboard

Version:

A Next.js Dashboard application for real-time monitoring and historical analysis of Playwright test executions, based on playwright-pulse-report. This component provides the UI for visualizing Playwright test results and can be run as a standalone CLI too

3 lines (2 loc) 7.77 kB
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},51150,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),x=e.i(26937),R=e.i(10372),f=e.i(93695);e.i(52474);var v=e.i(220),g=e.i(89171);async function E(e){try{let{testName:t,failureLogsAndErrors:r,codeSnippet:a}=await e.json();if(!t||!r)return g.NextResponse.json({message:"Missing required fields: testName and failureLogsAndErrors"},{status:400});let n=await fetch("https://ai-test-analyser.netlify.app/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testName:t,failureLogsAndErrors:r,codeSnippet:a||""})});if(!n.ok){let e=await n.text();return console.error(`External API error: ${n.status}`,e),g.NextResponse.json({message:`Error from external API: ${e}`},{status:n.status})}let s=await n.json();return g.NextResponse.json(s)}catch(t){console.error("Error in /api/analyze-test:",t);let e=t instanceof Error?t.message:"An unknown internal server error occurred";return g.NextResponse.json({message:e},{status:500})}}e.s(["POST",()=>E],88552);var m=e.i(88552);let w=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/analyze-test/route",pathname:"/api/analyze-test",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/analyze-test/route.ts",nextConfigOutput:"",userland:m}),{workAsyncStorage:y,workUnitAsyncStorage:C,serverHooks:A}=w;function N(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:C})}async function b(e,t,a){w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/analyze-test/route";g=g.replace(/\/index$/,"")||"/";let E=await w.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:C,parsedUrl:A,isDraftMode:N,prerenderManifest:b,routerServerContext:P,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,resolvedPathname:O,clientReferenceManifest:k,serverActionsManifest:S}=E,q=(0,i.normalizeAppPath)(g),_=!!(b.dynamicRoutes[q]||b.routes[O]),H=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,A,!1):t.end("This page could not be found"),null);if(_&&!N){let e=!!b.routes[O],t=b.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await H();throw new f.NoFallbackError}}let I=null;!_||w.isDev||N||(I="/index"===(I=O)?"/":I);let U=!0===w.isDev||!_,D=_&&!U;S&&k&&(0,o.setManifestsSingleton)({page:g,clientReferenceManifest:k,serverActionsManifest:S});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K={params:y,prerenderManifest:b,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>w.onRequestError(e,t,a,n,P)},sharedContext:{buildId:m}},z=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),B=d.NextRequestAdapter.fromNodeNextRequest(z,(0,d.signalFromNodeResponse)(t));try{let o=async e=>w.handle(B,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${g}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&T&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!_)return await (0,c.sendResponse)(z,L,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[R.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,P),t}},u=await w.handleResponse({req:e,nextConfig:C,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:j,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!_)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&_||f.delete(R.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(z,L,new Response(u.value.body,{headers:f,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,P),_)throw t;return await (0,c.sendResponse)(z,L,new Response(null,{status:500})),null}}e.s(["handler",()=>b,"patchFetch",()=>N,"routeModule",()=>w,"serverHooks",()=>A,"workAsyncStorage",()=>y,"workUnitAsyncStorage",()=>C],51150)}]; //# sourceMappingURL=%5Broot-of-the-server%5D__7113a113._.js.map